<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<script src="<ls:templateResource item='/resources/plugins/My97DatePicker/WdatePicker.js'/>" type="text/javascript"></script>
<%
			Long offset = (Long)request.getAttribute("offset");
	%>
    <table class="${tableclass}" style="width: 100%">
    <thead>
    	<tr><th><strong class="am-text-primary am-text-lg">用户管理</strong> /  用户登录历史统计</th></tr>
    </thead>
     <tbody><tr><td>
 <div align="left" style="padding: 3px">
<form:form  action="${contextPath}/admin/loginHistory/sum" id="form1">
<input type="hidden" id="curPageNO" name="curPageNO" value="${curPageNO}">
			&nbsp;用户名称
			<input class="${inputclass}" type="text" name="userName" id="userName" maxlength="50" value="${login.userName}" size="15"/>
		&nbsp;开始时间
			 <input readonly="readonly"  name="startTime" id="startTime" class="Wdate" type="text" onClick="WdatePicker()" value='<fmt:formatDate value="${login.startTime}" pattern="yyyy-MM-dd"/>' />
			&nbsp;结束时间 
			 <input readonly="readonly" name="endTime" id="endTime" class="Wdate" type="text" onClick="WdatePicker()" value='<fmt:formatDate value="${login.endTime}" pattern="yyyy-MM-dd"/>' />
			<input class="${btnclass}" type="submit" value="搜索" /> 
</form:form>
 </div>
 </td></tr></tbody>
    </table>

<div align="center">
        <%@ include file="/WEB-INF/pages/common/messages.jsp"%>
    <display:table name="list" requestURI="/admin/loginHistory/sum" id="item"
         export="false"  class="${tableclass}" style="width:100%" sort="external">
      <display:column title="顺序"  class="orderwidth"><%=offset++%></display:column>
      <display:column title="用户名">${item.userName}</display:column>
      <display:column title="登录次数">${item.loginCount}</display:column>
       <display:column title="最后登录时间" property="loginTime" format="{0,date,yyyy-MM-dd HH:mm:ss}"></display:column>
    </display:table>
        <ls:page pageSize="${pageSize }"  total="${total}" curPageNO="${curPageNO }"  type="default"/>
    </div>
	
	<script language="JavaScript" type="text/javascript">
		function pager(curPageNO){
			document.getElementById("curPageNO").value=curPageNO;
			document.getElementById("form1").submit();
		}
	 highlightTableRows("item");  	
</script>

